# Maintainer: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
pkgname=kubeconform
pkgver=0.6.6
pkgrel=2
pkgdesc="A FAST Kubernetes manifests validator, with support for Custom Resources!"
url="https://github.com/yannh/kubeconform"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/yannh/kubeconform/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

prepare() {
	default_prepare
	go mod download
}

build() {
	go build -o bin/ ./...
}

check() {
	go test ./...
}

package() {
	install -Dm0755 ./bin/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
e864cd6f870d195b7727c67b723d2ffb7e59e3c65153eebcb58d2601cf6a6d7b6ade005e49a9c6ec36ecde9ed8d7dc9c948adaa6a67773033022df4c76b4869e  kubeconform-0.6.6.tar.gz
"
